<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>jQuery带遮罩无限循环loading进度条插件</title>
  <script src="http://libs.useso.com/js/jquery/1.9.0/jquery.min.js"></script>
  <script src="js/loading-overlay.min.js"></script>
  <link rel="stylesheet" type="text/css" href="css/normalize.css" />
  <link rel="stylesheet" type="text/css" href="css/default.css">
  <link type="text/css" href="css/demo.css" rel="stylesheet">
</head>
<body>
  <header class="htmleaf-header">
      <h1>jQuery带遮罩无限循环loading进度条插件 <span>A jQuery Loading Overlay</span></h1>
      <div class="htmleaf-links">
        <a class="htmleaf-icon icon-home" href="http://www.htmleaf.com/" title="jQuery之家"><span> jQuery之家</span></a>
        <a class="htmleaf-icon icon-arrow-right3" href="http://www.htmleaf.com/jQuery/Layout-Interface/201501161216.html" title="返回下载页"><span> 返回下载页</span></a>
      </div>
    </header>
  <div class="demo">
    <div class="demo-content">
      <button class="toggle-loading">Toggle Overlay</button>
      <input type="checkbox" id="css-input" checked />
      <label for="css-input">show with demo css</label>
      <div id="target"></div>
    </div>
 </div>
  <script>
  jQuery(function ($) {
    var target = $('#target');

    $('.toggle-loading').click(function () {
      if (target.hasClass('loading')) {
        target.loadingOverlay('remove');
      } else {
        target.loadingOverlay();
      };
    });
  });
  </script>
</body>
</html>
